package com.jsj.mapper;

import com.jsj.pojo.Borrow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface BorrowReturnMapper {

    List<Borrow> queryAllBorrow();
    List<Borrow> queryBorrowByStatus(String borrowStatus);
    List<Borrow> queryBorrowByName(@Param("deviceName") String deviceName);
    Boolean addBorrow(Borrow borrow);
    Boolean returnDevice(@Param("borrowId") int borrowId, @Param("returnTime") Date returnTime,@Param("borrowStatus") String borrowStatus);
   // Boolean updateBorrowStatusById(@Param("borrowId") int borrowId,@Param("borrowStatus")String borrowStatus);

    Boolean updateBorrowById(Borrow borrow);
    Boolean delBorrowById(int borrowId);
}
